﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace WeChatSDK.WeChatDto.Conversation.ReceivingMessage.EventMessage
{
    /// <summary>
    /// 扫码推事件
    /// </summary>
    [XmlRoot(Namespace = "", IsNullable = false, ElementName = "xml")]
    public class ScanCodePushEventMessageDto:EventMessageDto
    {
        /// <summary>
        /// 事件KEY值，由开发者在创建菜单时设定
        /// </summary>
        [XmlElement("EventKey", DataType = "string")]
        public string EventKey { get; set; }
        /// <summary>
        /// 扫描信息
        /// </summary>
        [XmlArray("ScanCodeInfo")]
        public List<ScanCodeInfoDto> ScanCodeInfo { get; set; }
    }
    /// <summary>
    /// 扫描信息
    /// </summary>
    [XmlType]
    public class ScanCodeInfoDto
    {
        /// <summary>
        /// 扫描类型，一般是qrcode
        /// </summary>
        [XmlElement("ScanType", DataType = "string")]
        public string ScanType { get; set; }
        /// <summary>
        /// 扫描结果，即二维码对应的字符串信息
        /// </summary>
        [XmlElement("ScanResult", DataType = "string")]
        public string ScanResult { get; set; }
    }
}
